<template>
  <div>11</div>
</template>

<script setup>
// vue3 组合式生命周期 api的使用方式， on开头
// 销毁的时候 destroy 换成 unmount
// 创建的时候 created 换成 setup
import { onBeforeMount, onMounted } from 'vue';

console.log('1  setup');

onBeforeMount(() => {
  console.log('2  onBeforeMount');
});

onMounted(() => {
  console.log('3  onMounted');
});
</script>

<!-- <script>
export default {
  setup(){
    console.log('created');
  },
  mounted() {
    console.log('mounted');
  }
}
</script> -->
